﻿

<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	SysConfigSearchEvent event = (SysConfigSearchEvent)context.getSessionValue("SysConfigSearchEvent");
	ObjectList list = SysConfig.fetch().search(con,event);
%>

<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<script language=javascript>

var list_code = "listSysConfig";

function doSearch()
{

	//SetValue("s_Id",GetValue("i_Id")); //序号

	SetValue("s_Name",GetValue("i_Name")); //参数名称

	SetValue("s_Val",GetValue("i_Val")); //参数值

	//SetValue("s_Remark",GetValue("i_Remark")); //说明
	

	SetValue("s_OrderField",GetValue("i_OrderField")); //排序
	SetValue("s_OrderDesc",getCheckBoxValues("i_OrderDesc")); //升降序
	doCommonSearch();
}

function bizViewSysConfig(id)
{
	viewWin("<%=Config.getSrv()%>?action_code=viewSysConfig&Id="+id);
}

function doDelete()
{
	if(!hasChooseRadio("ids"))
	{
		bizMessage("删除","系统设置");
		return false;
	}
	if(!bizConfirm("删除","系统设置")) return false;
	SetAction("deleteSysConfig");
	frm.submit();
}

function doToAdd()
{
	SetAction("toAddSysConfig");
	frm.submit();
}

function doToUpdate()
{
	if(!checkOne("ids")) 
	{
		bizMessage("修改","系统设置");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toUpdateSysConfig");
	frm.submit();
}
function doToCopy()
{
	if(!checkOne("ids")) 
	{
		bizMessage("复制","系统设置");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toCopySysConfig");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>


<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">

<!--查询条件保留区域-->

<!--<input type=hidden name="s_Id" value="<%=event.getId()%>">--> <!--序号-->

<input type=hidden name="s_Name" value="<%=event.getName()%>"> <!--参数名称-->

<input type=hidden name="s_Val" value="<%=event.getVal()%>"> <!--参数值-->

<!--<input type=hidden name="s_Remark" value="<%=event.getRemark()%>">--> <!--说明-->


<%@ include file="/framework/list_head.jsp"%>

<br>
<!--********************* Part5:Search Area ***************-->
<%=uiSearchStart%>>
<%
	int key_tab = 1 ;
%>

<!--
	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			序号：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_Id" size="20" value="<%=event.viewId()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>
-->
	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			参数名称：

			<input type="text" class="texts" name="i_Name" size="20" value="<%=event.viewName()%>" key_tab="<%=key_tab++%>">
		</td>	
        
        <%=uiSearchInputTDHead%>>
            参数值：

            <input type="text" class="texts" name="i_Val" size="20" value="<%=event.viewVal()%>" key_tab="<%=key_tab++%>">
        </td>   	
	</tr>

<!--
	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			说明：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_Remark" size="20" value="<%=event.viewRemark()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>
-->

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%> colspan="2">
			按 排 序：
		
			<select name="i_OrderField">
				<option value="" <%=(event.getOrderField().equals("1"))?"selected":""%>>设置排序字段</option>
				
				<!--<option value="ID" <%=(event.getOrderField().equals("ID"))?"selected":""%>>序号</option>-->
				
				<option value="NAME" <%=(event.getOrderField().equals("NAME"))?"selected":""%>>参数名称</option>
				
				<option value="VAL" <%=(event.getOrderField().equals("VAL"))?"selected":""%>>参数值</option>
				
				<!--<option value="REMARK" <%=(event.getOrderField().equals("REMARK"))?"selected":""%>>说明</option>-->
				
			</select>
			&nbsp;&nbsp;
			<input type="radio" name="i_OrderDesc" value="false" <%=(event.isOrderDesc()==false)?"checked":""%> >升序
			<input type="radio" name="i_OrderDesc" value="true"  <%=(event.isOrderDesc()==true)?"checked":""%>  >降序
			<input type="button" value="查询" class="buttons" onclick="doSearch();return false;">&nbsp;<input type="button" value="清空" class="buttons" onclick="doClearEvent();return false;">
        </td>
	</tr>

<%=uiSearchEnd%>

<!--列表标题-->
<%=UIManager.addListHeadTitle("系统业务参数列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>

		<!--<%=UIManager.addListHead("序号",index++)%>-->

		<%=UIManager.addListHead("参数名称",index++)%>

		<%=UIManager.addListHead("参数值",index++)%>

		<%=UIManager.addListHead("说明",index++)%>
     
		<!-- <%=UIManager.addListHead("操作",-1)%>   -->
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		SysConfig obj = (SysConfig)list.get(i);
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" value="<%=obj.getId()%>">
    	</td>
    	
    
    	<!--<%=uiListDataTD%>><%=obj.viewId(con)%></td>-->
    
    	<%=uiListDataTD%>><%=obj.viewName(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewVal(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewRemark(con)%></td>
        

    	<!-- <%=uiListDataTD%>>
    		<a href="" onclick="bizViewSysConfig('<%=obj.getId()%>');return false;">浏览</a> -->
    	</td>
  	</tr>
<%	
	}
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


<!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
		<%=uiCommandTD%>>
		<input type=button value="    添加   " class="buttons" onclick="doToAdd();return false;">
		<input type=button value="    复制   " class="buttons" onclick="doToCopy();return false;">
		<input type=button value="    修改   " class="buttons" onclick="doToUpdate();return false;">
		<!-- <input type=button value="    删除   " class="buttons" onclick="doDelete();return false;"> -->
		</td>
	</tr>	
<%=uiCommandEnd%>
</form>


<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :Sindy
	FileName  :/system/base/SysConfigList.jsp
-->
